/**
 * 根据传入的类型名称,创建不同的控件
 */
<template>
  <table table border="1" cellspacing="0" cellpadding="0">
    <tr v-for="item in modelValue" :key="item.label" v-show="item.display == undefined || item.display == true">
      <td class="tb-content">
        {{ item.label }}
      </td>
      <td class="tb-content">
        <DSubComp :key="item.name" :type="item.type" :modelValue="item.value" :options="item.data" :name="item.name">
        </DSubComp>
      </td>
    </tr>
  </table>
</template>

<script>

import DSubComp from "./DSubComp.vue"
export default ({
  components: {
    DSubComp
  },
  props: ['modelValue']
})

</script>

<style scoped>
.tb-content {
  padding: 2px;
}
</style>
